package com.persicadev.shamsidatetimepicker;

import kankan.wheel.widget.adapters.AbstractWheelTextAdapter;
import android.content.Context;
import android.view.View;
import android.view.ViewGroup;

/**
 * Adapter for month
 */
class MonthAdapter extends AbstractWheelTextAdapter {
	// Countries names
	private String months[] =
			new String[] {"فروردین","اردیبهشت","خرداد","تیر","مرداد","شهریور","مهر","آبان","آذر","دی","بهمن","اسفند"};

	/**
	 * Constructor
	 */
	protected MonthAdapter(Context context) {
		super(context, R.layout.wheel_month, NO_RESOURCE);

		setItemTextResource(R.id.textView_month);
	}

	@Override
	public View getItem(int index, View cachedView, ViewGroup parent) {
		View view = super.getItem(index, cachedView, parent);
		return view;
	}

	public int getItemsCount() {
		return months.length;
	}

	@Override
	protected CharSequence getItemText(int index) {
		return months[index];
	}
}    